As computer systems grow more complex they increasingly employ multi-threaded programming techniques with large numbers of threads running in parallel. The threads may execute on one or more processors or on different cores within a multi-core processor. Writing a multi-threaded program can be difficult and error prone. Programming mistakes that result in synchronization errors between the threads can produce data race conditions where two or more threads access the same memory address in a non-deterministic way. This can produce varying and/or unpredictable results depending on random timing conditions. Such programming mistakes, while commonly made, are difficult to locate with conventional debugging tools.
Existing methods for detection and location of data race conditions typically involve run-time analysis of the entire program including inspection of every memory access. This can slow down execution speed by factors of 20 to 100 in addition to doubling memory usage. This type of analysis may also generate voluminous data race reports that often require extensive post-analysis filtering to focus on particular areas of interest in order for the analysis results to be manageable. These types of filters can become complex, difficult to maintain and often require further use of automated tools to create and manage. The difficulties are compounded since data race debugging is typically performed in an iterative workflow where the program is analyzed, a data race is detected and fixed, the program is re-compiled and the process is repeated. The overhead associated with this procedure can prevent regular use as part of a daily software build and test cycle.
Although the following Detailed Description will proceed with reference being made to illustrative embodiments, many alternatives, modifications, and variations thereof will be apparent to those skilled in the art.